const { Sequelize, sequelize } = require('../dao/db');

const User = sequelize.define('user', {
    id: {
        type: Sequelize.BIGINT(11),
        autoIncrement: true,
        primaryKey: true,
        unique: true
    },
    userName: {
        type: Sequelize.STRING,
        allowNull: false,
        comment: '用户名'
    },
    passWord: {
        type: Sequelize.STRING,
        allowNull: false,
        comment: '密码'
    }
}, {
    freezeTableName: true,
    tableName: 'user',
})

User.sync().then(() => {
    console.log('user表模型已经  同步 ');
});
module.exports = User